package routers

import (
	beego "github.com/beego/beego/v2/server/web"
	"rbac/controllers"
)

func init() {
	beego.Router("/", &controllers.MainController{})

	beego.Router("/login", &controllers.UserController{}, "post:Login") //登录api

	beego.Router("/role_node_add", &controllers.UserController{}, "post:RoleNodeAdd")

	beego.Router("/role_node", &controllers.UserController{}, "post:RoleNode")

	beego.Router("/user_role", &controllers.UserController{}, "post:UserRoleList")

	beego.Router("/role_add", &controllers.UserController{}, "post:RoleAdd")

	beego.Router("/user_add", &controllers.UserController{}, "post:UserAdd")

	beego.Router("/user_list", &controllers.UserController{}, "get:UserList")

	beego.Router("/page_list", &controllers.UserController{}, "get:PageList")

	beego.Router("/del", &controllers.UserController{}, "get:Del")

	beego.Router("/user_detail", &controllers.UserController{}, "get:UserDetail")
}
